<div class="form">

    <?php
    $form = $this->beginWidget('CActiveForm', array(
                'id' => 'software-form',
                'enableClientValidation' => true,
                'clientOptions' => array('validateOnSubmit' => true),
            ));
    ?>

    <p class="note">Fields with <span class="required">*</span> are required.</p>

    <?php echo CHtml::errorSummary($model); ?>

    <div class="row">
        <?php echo $form->labelEx($model, 'name'); ?>
        <?php echo $form->textField($model, 'name', array('size' => 80, 'maxlength' => 128)); ?>
        <?php echo $form->error($model, 'name'); ?>
    </div>
    <div class="row">
        <?php echo $form->labelEx($model, 'cate_id'); ?>
        <?php echo $form->dropDownList($model, 'cate_id', Lookup::items('software_cate')); ?>
        <?php echo $form->error($model, 'cate_id'); ?>
    </div>
    <div class="row">
        <?php echo $form->labelEx($model, 'description'); ?>
        <?php //echo CHtml::activeTextArea($model, 'description', array('rows' => 10, 'cols' => 70)); ?>
        <?php
            $this->widget('application.components.widgets.XHeditor',array(
                'model'=>$model,
                'modelAttribute'=>'description',
                'showModelAttributeValue'=>true, // defaults to true, displays the value of $modelInstance->attribute in the textarea
                'config'=>array(
                    'tools'=>'simple', // mini, simple, fill or from XHeditor::$_tools
                    'width'=>'100%',
                    //see XHeditor::$_configurableAttributes for more
                ),
                //'contentValue'=>$model->description,
            ));
            ?>
        <?php echo $form->error($model, 'description'); ?>
    </div>
    <div class="row">
        <?php echo $form->labelEx($model, 'technical'); ?>
        <?php //echo CHtml::activeTextArea($model, 'technical', array('rows' => 10, 'cols' => 70)); ?>
         <?php
            $this->widget('application.components.widgets.XHeditor',array(
                'model'=>$model,
                'modelAttribute'=>'technical',
                'showModelAttributeValue'=>true, // defaults to true, displays the value of $modelInstance->attribute in the textarea
                'config'=>array(
                    'tools'=>'simple', // mini, simple, fill or from XHeditor::$_tools
                    'width'=>'100%',
                    //see XHeditor::$_configurableAttributes for more
                ),
            ));
            ?>
        <?php echo $form->error($model, 'technical'); ?>
    </div>
    <div class="row">
        <?php echo $form->labelEx($model, 'change_log'); ?>
        <?php //echo CHtml::activeTextArea($model, 'change_log', array('rows' => 10, 'cols' => 70)); ?>
        <?php
            $this->widget('application.components.widgets.XHeditor',array(
                'model'=>$model,
                'modelAttribute'=>'change_log',
                'showModelAttributeValue'=>true, // defaults to true, displays the value of $modelInstance->attribute in the textarea
                'config'=>array(
                    'tools'=>'simple', // mini, simple, fill or from XHeditor::$_tools
                    'width'=>'100%',
                    //see XHeditor::$_configurableAttributes for more
                ),
            ));
            ?>
        <?php echo $form->error($model, 'change_log'); ?>
    </div>
    <div class="row">
        <?php echo $form->labelEx($model, 'type'); ?>
        <?php echo $form->dropDownList($model, 'type', Lookup::items('software_type')); ?>
        <?php echo $form->error($model, 'type'); ?>
    </div>
    
    <div class="row">
        <?php echo $form->labelEx($model, 'status'); ?>
        <?php echo $form->dropDownList($model, 'status', Lookup::items('software_satus')); ?>
        <?php echo $form->error($model, 'status'); ?>
    </div>

    <div class="row buttons">
        <?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
    </div>

    <?php $this->endWidget(); ?>

</div><!-- form -->
